<template>
  <nav>
    <span v-for="(route,index) in routers">
      <span v-if="index != 0"> | </span>
      <router-link :to="route.link">{{ route.text }}</router-link>
    </span>
  </nav>
  <router-view v-slot="{ Component }">
    <keep-alive>
      <component :is="Component" />
    </keep-alive>
  </router-view>
</template>
<script>
import { useRoute } from 'vue-router';
export default {
  name: 'NormalRouterView',
  components: {
  },
  setup () {
    let route = useRoute();

    return {
      routers: route.meta.routers,
    };
  }
}
</script>

<style>
</style>